#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <vector>

using namespace std;
const int Maxn = 300000;
int n,x,y;
vector<int> G[Maxn];
int dp[Maxn][3];
void dfs(int cur, int fa)
{
    for(int i=0; i<G[cur].size(); i++){
        int u=G[cur][i];
        if(u==fa) continue;
        dfs(u, cur);
        int t1 = max(dp[u][0], dp[u][1]);
        int t2 = max(t1, dp[u][2]);
        int t3 = max(t1, t2);
        dp[cur][2] = max(dp[cur][2]+t3, dp[cur][1]+t1+1);
        dp[cur][1] = max(dp[cur][1]+t3, dp[cur][0]+t1+1);
        dp[cur][0] += t3;
    }

}
int main()
{
    cin >> n >> x >> y;
    for(int i=1;i<n;i++){
        int u,v;
        cin >> u >> v;
        G[u].push_back(v);
        G[v].push_back(u);

    }
    dfs(1, 0);
    long long ans;
    if(x<=y){
        int tmp = max(dp[1][0], max(dp[1][1], dp[1][2]));
        ans = (long long)x*tmp+(long long)(n-1-tmp)*y;
    }else{
        int shit = 0;
        for(int i=1; i<=n; i++){
            if(G[i].size() == n-1) shit = 1;
        }
        ans = (long long)(n-1-shit)*y + (long long)shit*x;
    }
    cout << ans << endl;
    return 0;
}
